﻿namespace _RobotInspection.Attributes
{
    /// <summary>
    /// 自定义接口状态标签特性
    /// 用于在Swagger中显示接口当前状态
    /// </summary>
    [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
    public class ApiStatusAttribute : Attribute
    {
        public ApiStatusEnum Status { get; }   // ✅ 必须是属性

        public ApiStatusAttribute(ApiStatusEnum status)
        {
            Status = status;                   // ✅ 这里要有赋值
        }
    }
    /// <summary>
    /// 接口开发状态枚举
    /// </summary>
    public enum ApiStatusEnum
    {
        /// <summary>接口正在开发中</summary>
        Developing,
        /// <summary>接口已进入测试阶段</summary>
        Testing,
        /// <summary>接口开发和测试已完成</summary>
        Completed,
        /// <summary>接口已废弃或不再使用</summary>
        Deprecated
    }
}
